<?php
/**
 * Created by PhpStorm.
 * User: FDG367
 * Date: 2017/9/25
 * Time: 9:26
 */
namespace common\models;

use Yii;
use \yii\db\ActiveRecord;

class GoodsLineSync extends ActiveRecord{

	/**
	 * @return string 商品同步信息表
	 */
	public static function tableName(){
		return '{{%goods_line_sync}}';
	}

	/**
	 * @inheritdoc
	 */
	public function rules(){
		return [
			[['item_no'], 'unique'],
			[['item_no','item_desc','inv_status','inv_desc','item_sort','itemtype', 'item_group', 'swatch_no', 'item_spec','item_flowers','item_stuff', 'item_u_m','brand_code', 'brand_ename', 'brand_cname', 'sample_num','getcodeno', 'categoryno','item_sf','vendor_no', 'vendormodel','minin_qty', 'color','mechanism', 'isstandard', 'item_country', 'item_state', 'item_meter','list_price','item_xc', 'item_xc_plus', 'item_price','item_date','is_vip', 'is_parent','	parent_item','itemname', 'fabricno', 'itemmodel', 'itemseries','itemdesigner', 'reforminfo','vendorcode','is_pattern','is_longitem', 'is_senior','is_configbom', 'is_mts','curinccode','preinccode','showd01', 'showd02', 'comments', 'functionality', 'isunique', 'isnewitem', 'issold', 'flowertype', 'itememployee','wfixedhigh', 'minfabricwidth','maxflowerrepeat', 'itemspecialmaterial', 'accessories', 'version','consult','create_time','update_time'], 'safe'],
		];
	}

	public function beforeSave($insert){
		if($insert){
			$this->create_time	= date('Y-m-d H:i:s');
		}
		$this->update_time	= date('Y-m-d H:i:s');
		parent::beforeSave($insert);
		return true;
	}



}